package com.ntschy.common.core.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author cm
 */
@Data
@ToString(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "app分页查询基础dto")
public class AppPageQuery implements Serializable {

    @ApiModelProperty(value = "当前页码")
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "启始页码从1开始")
    private Integer currPage;

    @ApiModelProperty(value = "页面大小")
    @NotNull(message = "页面大小不能为空")
    private Integer pageSize;
}
